package tool

import "time"

func GetTimeZoneShangHai() (*time.Location, error) {
	loc, err := time.LoadLocation("Asia/Shanghai")
	if err != nil {
		return nil, err
	}
	return loc, nil
}

func GetGoTime(tStr string) (*time.Time,error) {
	loc, err := time.LoadLocation("Asia/Shanghai")
	if err != nil {
		return nil, err
	}
	timeObj, err := time.ParseInLocation("2006-01-02 15:04:05", tStr, loc)
	if err != nil {
		return nil,err
	}
	return &timeObj, nil
}
